float sum(float data[], int N) {
    float s = 0;
    for (int i = 0; i < N; i++) {
        s += data[i];
    }
    return s;
}
